import http from './http/index';

export function apiGetCarPage(data: any) {
  return http({
    method: 'POST',
    url: '/api/car/record/page',
    data,
  });
}

export function apiGetSpaceCarList(data: any) {
  return http({
    method: 'GET',
    url: `/api/car/record/list/${data.id}`,
    params: data,
  });
}

export function apiGetSpaceCarListFast(data: any) {
  return http({
    method: 'POST',
    url: `/api/car/record/listForUrgent`,
    data,
  });
}

export function apiAddCar(data: any) {
  return http({
    method: 'POST',
    url: '/api/car/record/create',
    data,
  });
}

export function apiEditCar(data: any) {
  return http({
    method: 'POST',
    url: '/api/car/record/update',
    data,
  });
}

export function apiGetCarDetail(data: any) {
  return http({
    method: 'GET',
    url: `/api/car/record/get/${data.id}`,
  });
}

export function apiDelCar(data: any) {
  return http({
    method: 'GET',
    url: `/api/car/record/delete/${data.id}`,
  });
}

export function apiGetCarPannel(data?: any) {
  return http({
    method: 'POST',
    url: '/api/car/record/orderList',
    data,
  });
}

export function apiGetCarAllData(data?: any) {
  return http({
    method: 'GET',
    url: `/api/car/record/getNew/${data.id}`,
  });
}
